package day0204

func fib(n int) int {
	if n == 0 || n == 1 {
		return n
	}
	pre, cur := 0, 1
	for i := 2; i < n; i++ {
		temp := cur
		cur = pre + cur
		pre = temp
	}
	return cur
}
